﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HelloWorld
{
    public partial class frmHW : Form
    {
        public frmHW()
        {
            InitializeComponent();
        }

        private void btnArea_Click(object sender, EventArgs e)
        {
            try
            {
                double radius = Double.Parse(tbRadius.Text);
                MyCircle circle = new MyCircle();
                circle.setRadius(radius);
                double area = circle.computeArea();
                tbArea.Text = area.ToString("0.0000");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}
